package com.example.demo.finitestatemachine.transition;

/**
 * Copyright (c) 2018-2022 ThunderSoft
 * All Rights Reserved by Thunder Software Technology Co., Ltd and its affiliates.
 * You may not use, copy, distribute, modify, transmit in any form this file
 * except in compliance with ThunderSoft in writing by applicable law.
 */

import com.example.demo.finitestatemachine.event.LiftEvent;
import com.example.demo.finitestatemachine.event.LiftEventCodeEnums;
import com.example.demo.finitestatemachine.state.LiftState;

/**
 * @author liyuncong
 * @version 1.0
 * @file ClosingTransition
 * @brief ClosingTransition
 * @details ClosingTransition
 * @date 2022-12-28
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                        NAME               DESCRIPTION
 * 2022-12-28                  liyuncong          Created
 */
public class ClosingTransition extends AbstractLiftTransition {
    public ClosingTransition(
        LiftState currentState,
        LiftState nextState
    ) {
        super(currentState, nextState, LiftEventCodeEnums.CLOSING);
    }

    @Override
    protected boolean doExecute(LiftEvent event) {
        System.out.println("Lift closing the door...");
        return true;
    }
}
